package com.yuandian.api.management.vo;

import cn.hutool.core.builder.EqualsBuilder;
import cn.hutool.core.builder.HashCodeBuilder;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 区域vo
 * </p>
 *
 * @author fucx
 * @since 2020-11-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AreaDataVo {

	/**
     * 区域ID
     */
    private Integer id;

    /**
     * 区域行政编码
     */
    private String code;

    /**
     * 区域名称
     */
    private String name;


	@Override
	public boolean equals(Object o) {
		if (this == o) return true;

		if (o == null || getClass() != o.getClass()) return false;

		AreaDataVo that = (AreaDataVo) o;

		return new EqualsBuilder().append(code, that.code).isEquals();
	}

	@Override
	public int hashCode() {
		return new HashCodeBuilder(17, 37).append(code).toHashCode();
	}

}
